public class Student implements Comparable<Student>{
    private String studentID,studentName;
    private int age;
    public String getStudentName(){
        return this.studentName;
    }//得到学生姓名
    public int getAge(){return this.age;}//得到学生年龄
    public Student(String studentID,String studentName,int age){
        this.studentID=studentID;
        this.studentName=studentName;
        this.age=age;
    }
    public int compareTo(Student o){
        //按学号升序排列
        return this.studentID.compareTo(o.studentID);
    }
    public String toString(){
        return "("+studentID+","+studentName+","+age+")";
    }
}
